﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WRSManagementSystem.DomainModel.Entities.Project>" %>
<%@ Import Namespace="WRSManagementSystem.DomainModel.Entities" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Szczegóły
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Szczegóły projektu</h2>

    <fieldset>
        <legend>Informacje</legend>
                
        <div class="display-label">Id</div>
        <div class="display-field"><%=Html.Encode(Model.Id)%></div>
        
        <div class="display-label">Nazwa</div>
        <div class="display-field"><%=Html.Encode(Model.Name)%></div>
        
        <div class="display-label">Początek</div>
        <div class="display-field"><%=Html.Encode(String.Format("{0:g}", Model.StartDate))%></div>
        
        <div class="display-label">Koniec</div>
        <div class="display-field"><%=Html.Encode(String.Format("{0:g}", Model.EndDate))%></div>
        
        <div class="display-label">Koordynator</div>
        <div class="display-field"><%=Html.Encode(Model.Creator.Name + " " + Model.Creator.Surname)%></div>
    </fieldset>

    <fieldset>
    <legend>Zadania</legend>
        <%
            Html.RenderPartial("TaskView", Model.Tasks);%>
    </fieldset>

    <fieldset>
    <legend>Materiały</legend>
        <%
            foreach (GlobalResource item in Model.GlobalResources)
            {%>
           <div class="display-label"> <%=Html.Encode(item.Name)%></div>
        <%
            }%>
    </fieldset>
    <p>
        <%=Html.ActionLink("Edytuj", "../Project/Edit", new {id = Model.Id})%> |
        <%=Html.ActionLink("Powrót do listy", "../Project/Index")%>
    </p>

</asp:Content>

